<?php

class Application_Form_Bewertungen extends Zend_Form
{

    public function init()
    {
        
    	$this->setName("Bewertungen");
    	$this->setMethod('post');
    	
    	
    	$titel = new Zend_Form_Element_Text('titel');
    	$titel->setLabel('Titel*:')
    	->setRequired(true)
    	->addFilter('HtmlEntities');
    	
    	$anzschiffe = new Zend_Form_Element_Text('anzschiffe');
    	$anzschiffe->setLabel('Anzahl an Schiffen (0-5):')
    	->addValidator('Alnum', true)
    	->setRequired(true);
    	
    	// create text area for Bewertung
    	$text = new Zend_Form_Element_Textarea('bewertung');
    	$text->setLabel('Bewertung:')
    	->setOptions(array(
    			'id' => 'comment',
    			'rows' => '3',
    			'cols' => '55',
    	))
    	->setRequired(true)
    	->addFilter('HtmlEntities');
    	
    	// create submit button
    	$submit = new Zend_Form_Element_Submit('submit');
    	$submit->setLabel('Submit')
    	->setOptions(array('class' => 'submit'));
    	
    	
    	// attach elements to form
    	$this->addElement($titel)
    	->addElement($text)
    	->addElement($anzschiffe)
    	->addElement($submit);
    	
    }

}

